{% extends "base/base.html" %}

{% block title %}{{ gettext("Edit My Profile") }}{% endblock %}

{% block headblock %}
    <link rel="stylesheet" href="{{ STATIC_URL }}themes/countrybox.css" type="text/css" />
    <script src="{{ STATIC_URL }}js/countrybox.js"></script>
{% endblock %}

{% block main %}
<h2><img class="icon_header" src="{{ STATIC_URL }}user.png" alt="" />{{ gettext("My Profile Settings") }}</h2>
<div class="profile-theme"><a href="{{ url("dv-themelist") }}">Change theme</a></div>
<a href="/accounts/password/change/">{{ gettext("Change My Password") }}</a><br />
<a href="{{ url ("dv-profile", profile.user) }}">{{ gettext("View My Live Profile") }}</a><br />

<h2>{{ gettext("OpenID") }}</h2>
<span>{{ gettext("Your") }} <a href="http://openidexplained.com/" target="_blank">OpenID</a> {{ gettext("key") }}:</span>
<ul>
{% for id in user.openid_set.all() %}
    <li><img src="{{ STATIC_URL }}/openid-icon.png" alt="OpenID"/> {{ dv.site_url() }}{{ id.get_absolute_url() }}<br/></li>
    {% if id.trustedroot_set.all() %}
    <span>{{ gettext("Allowed sites") }}:</span>
        <ul>
        {% for root in id.trustedroot_set.all() %}
            <li><a href="{{ root.trust_root }}" target="_blank">{{ root.trust_root }}</a> - <a href=".?killroot={{ root.id }}" title="Remove">[x]</a></li>
        {% endfor %}
        </ul>
    {% endif %}
{% endfor %}
</ul>

{% if user.get_profile().have_artist() %}
<h2>Song settings</h2>
Change license on ALL my songs :
<form action="." method="post">
<table>
{{ lic }}
</table>
{{ lic.media }}
<input type="submit" value="Change them all!" name="artistdata"/>
</form>
{% endif %}

<h2><img class="icon_header" src="{{ STATIC_URL }}page_white_edit.png" alt="" />{{ gettext("Profile Settings") }}</h2>
<form action="." method="post" enctype="multipart/form-data">
<table id="profileform">
{{ form.as_table() }}
</table>

{{ links }}

<input type="submit" value="{{ gettext("Update") }}" />
</form>
{% endblock %}

